<template>
	<view class="index" :style="{'height':windowHeight}">
		<clothes></clothes>
		<view class="flowing">
			<view class="flowing-li" v-for="(item,index) in list">
				<view class="li-top">
					<view class="li-top-left">充值套餐</view>
					<view class="li-top-right">-9.80</view>
				</view>
				<view class="li-btm">
					<view class="li-btm-left">2025-04-03 19:10:42</view>
					<view class="li-btm-rig">余额:90.20</view>
				</view>
			</view>
			<!-- 空数据 -->
			<view v-if="list.length == 0">
				<NoData></NoData>
			</view>
		</view>
		
	</view>
</template>
<script>
	export default {
		components: {},
		data() {
			return {
				windowHeight: "200px", 
				list:[1,2,3,4]
			}
		},
		onLoad() {
			this.GaoDu() //判断手机高度
			// this.queryAccountStatement()	//查询账户流水信息列表
			this.queryAccountBalance()	//查询账户余额信息
		},
		methods: {
			// 查询账户余额信息
			queryAccountBalance(){
				const value = uni.getStorageSync('info');
				this.$REQ(this.$api.queryAccountBalance, {
					userId:value.userId
				}, 'POST').then(res => {
					console.log(res)
					this.queryAccountStatement(res.data.data.id)
				}).catch(err => {
					console.log(err)
				})
			},
			//查询账户流水信息列表
			queryAccountStatement(id){
				this.$REQ(this.$api.queryAccountStatement, {
					walletId:id
				}, 'POST').then(res => {
					console.log(res)
				}).catch(err => {
					console.log(err)
				})
			},
			// 判断手机高度
			GaoDu() {
				console.log('12356')
				// 判断手机页面的高度
				uni.getSystemInfo({
					success: (res) => {
						this.windowHeight = res.windowHeight + "px";
					}
				})
			},
		}
	}
</script>

<style scoped lang="less">
	.index {
		width: 100%;
		height: 100%;
		background: #ECF4FF;
	}
	.flowing{
		padding: 25rpx;
	}
	.flowing-li{
		padding: 25rpx 30rpx;
		background: #fff;
		border-radius: 20rpx;
		margin-bottom: 25rpx;
	}
	.li-top{
		display: flex;
		flex-wrap: nowrap;
		justify-content:space-between;
	}
	.li-top-left{
		font-size: 30rpx;
		font-weight: 600;
		color: #000;
	}
	.li-top-right{
		font-size: 32rpx;
		font-weight: 600;
		color: #449CEC;
	}
	.li-btm{
		display: flex;
		flex-wrap: nowrap;
		justify-content:space-between;
		padding-top: 15rpx;
	}
	.li-btm-left{
		font-size: 28rpx;
	}
	.li-btm-rig{
		font-size: 30rpx;
	}
	@import url("@/pages/css.css");
</style>